Skip to content

Improve readme to get started with plotly.js JSON interface for non-JavaScript developers and adjust dist/README #5705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 3, 2021

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jun 2, 2021

@plotly/plotly_js

README.md Outdated

### Install with npm

## Load from npm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have this be first

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a0bd258.

README.md Outdated
* [Notable contributors](#creators)
* [Copyright and license](#copyright-and-license)

---
## Quick start options
## Load from CDN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would spell out "Content Delivery Network (CDN)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a0bd258.

README.md Outdated
## Load from CDN
Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastly.com/open-source>.

### Minified plotly.js X.Y.Z bundles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename this "Usage example"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a0bd258.

README.md Outdated
<script src="https://cdn.plot.ly/plotly-2.0.0-rc.2.js" charset="utf-8"></script>
```

#### Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.4. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for little "notes" like this, please don't use #### but rather prefix them with > so they get indented/dimmed a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a0bd258.

README.md Outdated

[Latest and rc releases on GitHub](https://github.com/plotly/plotly.js/releases/)
---
## Versioning
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably doesn't need to be a top-level item, just a little note somewhere, maybe under the NPM section. it's kind of the norm anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a0bd258.

@nicolaskruchten
Copy link
Contributor

Looks better, but why is the MathJax section under Documentation?

@nicolaskruchten
Copy link
Contributor

I'd put it in the CDN section I think

README.md Outdated
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"></script>
<script src="https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js"></script>
```

## Partial bundles

There are two kinds of plotly.js partial bundles:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we maybe define what a partial bundle is and why we talk about them?

README.md Outdated
1. The official partial bundles that are distributed to `npm` and the CDN, described in [the dist README](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
## Bundles
There are two kinds of plotly.js bundles:
1. Complete and partial official bundles that are distributed to `npm` and the `CDN`, described in [the dist README](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
2. Custom bundles you can create yourself, if none of the distributed packages meet your needs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this custom-bundles section could live in its own separate file, which would be linked to from here (and then all three of dist/custom-bundles/building readmes would link to each other as they are essentially alternative ways of doing similar things)

@nicolaskruchten
Copy link
Contributor

The BUILDING.md file doesn't really provide a decent motivation for why you'd want to build Plotly.js into your library or explain the modules concept etc... Can we take some of what used to be in "modules" in the main readme and transplant it into Building please? Basically show folks how they can directly import parts of Plotly into their app (a) and then if they import modules that require special webpack/"ify"-handling, tell them how to do it?

Because if someone wants to build their own app, with just the bar-chart bundle imported directly, they don't need all the "ify" stuff, right?

@archmoj archmoj changed the title Improve readme to get started with plotly.js JSON interface for non-JavaScript developers Improve readme to get started with plotly.js JSON interface for non-JavaScript developers and adjust dist/README Jun 3, 2021
@archmoj archmoj requested a review from alexcjohnson June 3, 2021 14:59
@archmoj
Copy link
Contributor Author

archmoj commented Jun 3, 2021

OK. There are still things that we could improve with the READMEs.
In the past few commits I improved tasks/stats.js which writes dist/README.md.
Hope it reads better now.
@alexcjohnson I'd appreciate a quick review and I'd be happy to work on the remainings in a separate PR : )

@alexcjohnson
Copy link
Collaborator

This all looks good to me, but you've got @nicolaskruchten's comments here, wouldn't it be easier to just address the last couple in this PR and be done with it?

@archmoj
Copy link
Contributor Author

archmoj commented Jun 3, 2021

This all looks good to me, but you've got @nicolaskruchten's comments here, wouldn't it be easier to just address the last couple in this PR and be done with it?

The diff is already big and we want to move more lines to new files.
So I'd rather having a separate PR to better address/review those comments.

@archmoj
Copy link
Contributor Author

archmoj commented Jun 3, 2021

new CUSTOM_BUNDLE file added in d6b5498

@nicolaskruchten
Copy link
Contributor

💃

@archmoj archmoj merged commit e932c17 into master Jun 3, 2021
@archmoj archmoj deleted the readme-order branch June 3, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants